package edu.gyc.hisecurity.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import edu.gyc.hisecurity.dao.MenuDao;
import edu.gyc.hisecurity.model.Menu;
import edu.gyc.hisecurity.service.MenuService;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ls
 * @since 2019-12-06
 */
@Service
public class MenuServiceImpl extends ServiceImpl<MenuDao, Menu> implements MenuService {

@Resource
MenuDao menuDao;

    @Override
    @Cacheable(cacheNames = "himenu",key = "'menusRoles'")
    public List<Menu> getAllMenusWithRole() {
        return menuDao.getAllMenusWithRole();
    }
}
